<div class="card">
    <div class="card-header">
        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-default">添加广告</button>
        <div class="card-tools">
            <div class="input-group input-group-md">
                <input type="text" class="form-control" id="keyword" placeholder="搜索关键字">
                <div class="input-group-append">
                    <div class="btn btn-primary">
                        <i class="fas fa-search"></i>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <!-- /.card-header -->
    <div id="advTable" class="card-body">
        <table id="advTable" class="table table-bordered">
            <thead>
            <tr>
                <th>id</th>
                <th>广告标题</th>
                <th>广告图片</th>
                <th>广告类别</th>
                <th>广告链接</th>
                <th>广告排序</th>
                <th>添加时间</th>
                <th>修改时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>

            <tr>

                <td>6572d2a1071b8609085f172a</td>
                <td>111</td>
                <td><img height="80" src="http://127.0.0.1:3000/2023/12/08/1702023841083.jpg" alt=""></td>
                <td>轮播图广告</td>
                <td>11</td>
                <td>11</td>
                <td>2023-12-08 16:24:01</td>
                <td>2023-12-08 16:24:01</td>
                <td>
                    <button onclick="deleteAdv('6572d2a1071b8609085f172a')" type="button" class="btn btn-danger btn-sm">删除</button>
                    <button type="button" onclick="openModel('6572d2a1071b8609085f172a')" class="btn btn-success btn-sm">修改</button>
                </td>
            </tr>

            </tbody>
        </table></div>
    <!-- /.card-body -->
    <div class="card-footer clearfix" id="pageDiv"><ul class="pagination pagination-sm m-0 float-right">
            <li class="page-item"><a href="javascript:;" onclick="getAdvList(1)" class="page-link">«</a></li>

            <li class="page-item active">
                <a onclick="getAdvList(1)" class="page-link" href="javascript:;">1</a>
            </li>

            <li class="page-item"><a href="javascript:;" onclick="getAdvList(1)" class="page-link">»</a></li>
        </ul></div>
</div>

<div class="modal fade show" id="modal-default" style="padding-right: 17px;" aria-modal="true" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">添加广告</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <form name="advForm" class="form-horizontal">
                <div class="card-body">
                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label" for="advTitle">标题：</label>
                        <div class="col-sm-10">
                            <input id="advTitle" name="advTitle" type="text" class="form-control" placeholder="请输入广告标题">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label" for="advType">类别:</label>
                        <div class="col-sm-10">
                            <select name="advType" id="advType" class="form-control">
                                <option value="1">轮播图广告</option>
                                <option value="2">轮播图底部广告</option>
                                <option value="3">热门回收广告</option>
                                <option value="4">优品精选广告</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label" for="advHref">链接：</label>
                        <div class="col-sm-10">
                            <input id="advHref" name="advHref" type="text" class="form-control" placeholder="请输入广告链接">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label" for="advHref">排序：</label>
                        <div class="col-sm-10">
                            <input id="advOrder" name="advOrder" type="text" class="form-control" placeholder="请输入广告排序，数字越大越靠前">
                        </div>
                    </div>


                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label" for="advPic">图片：</label>
                        <div class="col-sm-10 custom-file">
                            <input type="file" class="form-control" name="advPic" id="advPic">
                        </div>
                    </div>

                </div>
            </form>
            <div class="modal-footer justify-content-between">
                <button type="button" class="btn btn-default" id="adv-cancel" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" id="adv-save">提交</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>